<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
	<head>
		<meta charset="utf-8">
		<title>继续上传考试题目</title>
		<link href="css/app.css" rel="stylesheet">
		<link rel="stylesheet" href=""/>
		<link rel="stylesheet" href="../../static/css/exam/upexamqmid.css"/>
	</head>
	<body>
		<div class="wrapper">
			<nav id="sidebar" class="sidebar js-sidebar">
				<div class="sidebar-content js-simplebar">
					<a class="sidebar-brand" href="index.html">
		      <span class="align-middle">AdminKit</span>
		    </a>
		
					<ul class="sidebar-nav">
						<li class="sidebar-header">
							Pages
						</li>
						<li class="sidebar-item">
							<a class="sidebar-link" href="pages-profile.html">
								<i class="align-middle" data-feather="user"></i> <span class="align-middle">Profile</span>
						</a>
						</li>
						<li class="sidebar-item">
									<a class="sidebar-link" href="charts-chartjs.html">
						  <i class="align-middle" data-feather="bar-chart-2"></i> <span class="align-middle">Charts</span>
						</a>
								</li>
						
								<li class="sidebar-item">
									<a class="sidebar-link" href="maps-google.html">
						  <i class="align-middle" data-feather="map"></i> <span class="align-middle">Maps</span>
						</a>
								</li>
					</ul>
				</div>
			</nav>
		
			<div class="main">
				<nav class="navbar navbar-expand navbar-light navbar-bg">
					<a class="sidebar-toggle js-sidebar-toggle">
						<i class="hamburger align-self-center"></i>
					</a>
		
					<div class="navbar-collapse collapse">
						<ul class="navbar-nav navbar-align">
							<li class="nav-item dropdown">
								<a class="nav-icon dropdown-toggle d-inline-block d-sm-none" href="#" data-bs-toggle="dropdown">
									<i class="align-middle" data-feather="settings"></i>
								</a>
		
								<a class="nav-link dropdown-toggle d-none d-sm-inline-block" href="#" data-bs-toggle="dropdown">
									<i class="align-middle me-2" data-feather="feather"></i>
									<span th:if="${usertype} eq '0'">老师</span>
									<span th:if="${usertype} eq '1'">学生</span>
									<span th:if="${usertype} eq '2'">管理员</span>
									<img src="img/avatars/avatar.jpg" class="avatar img-fluid rounded me-1" alt="Charles Hall" /> 
									<span class="text-dark" th:text="${usermail}"></span>
								</a>
								<div class="dropdown-menu dropdown-menu-end">
									<a class="dropdown-item" href="pages-profile.html"><i class="align-middle me-1" data-feather="user"></i> Profile</a>
									<div class="dropdown-divider"></div>
									<a class="dropdown-item" href="#">Log out</a>
								</div>
							</li>
						</ul>
					</div>
				</nav>
				
				<!--在这里写我自己的东西-->
			<section class="mainbox">
				<div class="container-fluid p-0">
						<div class="mb-3">
				
						</div>
						<div class="row">
							<div class="col-md-4">
								<div class="examinfo">
									<div class="examtitle">
										<div class="forh3">
											<h2>考试信息</h2>
										</div>
										<div class="forh3">
											<a class="badge bg-success text-white ms-2" th:if ="${type} eq '0'">
											    贡献为题库
											</a>
											<a class="badge bg-success text-white ms-2" th:if ="${type} eq '1'">
											    不贡献为题库
											</a>
										</div>
									</div>
									<div class="subexaminfo">
										<div class="subsub">
											考试id:<p th:text="${newexamid}"></p>
										</div>
										<div class="subsub">
											考试科目:<p th:text="${subject}">111</p>
										</div>
									</div>
									<div class="subexaminfo">
										<div class="subsub">
											开始时间:<p th:text="${starttime}"></p>
										</div>
										<div class="subsub">
											结束时间:<p th:text="${endtime}"></p>
										</div>
									</div>
									<div class="subexamclass">
										<div class="subsub">
											<p>班级id</p>
										</div>
										<div th:each="i:${classidlist}">
											<div class="subsub">
												<p th:text="${i}"></p>
											</div>
										</div>	
									</div>	
									<div class="subexamclass">
										<div class="subsub">
											<p>班名</p>
										</div>
										<div th:each="i:${classnames}">
											<div class="subsub">
												<p th:text="${i}"></p>
											</div>
										</div>	
									</div>	
								</div>
								<div class="questioncard">
									<div class="forh3">
										<h2 style="margin-top: 7px;">出题卡</h2>
										<div class="forpoint">
											<p style="padding-left:12px">目前总分:</p>
										</div>
										<div class="forpoint">
											<p th:text="${totalpoint}" style="margin-left: 15px;"></p>
										</div>
									</div>
									<div th:if="${not #lists.isEmpty(upcqlist)}">
										<div class="qlistborder">
										    <h4 style="margin-top:8px;margin-left:15px;margin-bottom:0px;">选择题</h4>
											<div class="forqlist">
												<div class="forq"  th:each="i:${upcqlist}">
													<form action="/Addexam_qdetail" enctype='multipart/form-data' method='POST'>
														<button type="submit" style="width: 40px; height: 40px; border-radius: 50%;border: none;background-color: #17A2B8;">
															<input type="hidden" name="qtype" value=0><br/>
															<p style="margin-top:-10px;"th:text="${iStat.count}"></p>
															<input type="hidden" name="qid" th:value="${i}">
														</button>
													</form>
												</div>
											</div>	
										</div>
									</div>
									<div th:if="${not #lists.isEmpty(upjqlist)}">
										<div class="qlistborder">
										    <h4 style="margin-top:8px;margin-left:15px;margin-bottom:0px;">判断题</h4>
											<div class="forqlist">
												<div class="forq" th:each="i:${upjqlist}">
													<form action="/Addexam_qdetail" enctype='multipart/form-data' method='POST'>
														<button type="submit" style="width: 40px; height: 40px; border-radius: 50%;border: none;background-color: #17A2B8;">
															<input type="hidden" name="qtype" value=1><br/>
															<p style="margin-top:-10px;"th:text="${iStat.count}"></p>
															<input type="hidden" name="qid" th:value="${i}">
														</button>
													</form>
												</div>
											</div>	
										</div>
									</div>
									<div th:if="${not #lists.isEmpty(upfqlist)}">
										<div class="qlistborder">
										    <h4 style="margin-top:8px;margin-left:15px;margin-bottom:0px;">填空题</h4>
											<div class="forqlist">
												<div class="forq" th:each="i:${upfqlist}">
													<form action="/Addexam_qdetail" enctype='multipart/form-data' method='POST'>
														<button type="submit" style="width: 40px; height: 40px; border-radius: 50%;border: none;background-color: #17A2B8;">
															<input type="hidden" name="qtype" value=2><br/>
															<p style="margin-top:-10px;"th:text="${iStat.count}"></p>
															<input type="hidden" name="qid" th:value="${i}">
														</button>
													</form>
												</div>
											</div>	
										</div>
									</div>
									<div th:if="${not #lists.isEmpty(upbqlist)}">
										<div class="qlistborder">
										    <h4 style="margin-top:8px;margin-left:15px;margin-bottom:0px;">简答题</h4>
											<div class="forqlist" th:each="i:${upbqlist}">
												<div class="forq">
													<form action="/Addexam_qdetail" enctype='multipart/form-data' method='POST'>
														<button type="submit" style="width: 40px; height: 40px; border-radius: 50%;border: none;background-color: #17A2B8;">
															<input type="hidden" name="qtype" value=3><br/>
															<p style="margin-top:-10px;"th:text="${iStat.count}"></p>
															<input type="hidden" name="qid" th:value="${i}">
														</button>
													</form>
												</div>
											</div>	
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-8">
								<div class="bigbox">
									<div class="typechoose">
											<div class="eachtype">
												<form action="/AddingExamquestion1" enctype='multipart/form-data' method='POST'>
													<button type="submit" style="width: 80px; height: 40px; border-radius: 20%;border: none;background-color: #17A2B8;">
														<input type="hidden" name="qtype" value=0><br/>
														<h4 style="margin-top:-10px;">
															<font color="white">选择题</font>
														</h4>
													</button>
												</form>
											</div>
											<div class="eachtype">
												<form action="/AddingExamquestion1" enctype='multipart/form-data' method='POST'>
													<button type="submit" style="width: 80px; height: 40px; border-radius: 20%;border: none;background-color: #17A2B8;">
														<input type="hidden" name="qtype" value=1><br/>
														<h4 style="margin-top:-10px;">
															<font color="white">判断题</font>
														</h4>
													</button>
												</form>
											</div>
											<div class="eachtype">
												<form action="/AddingExamquestion1" enctype='multipart/form-data' method='POST'>
													<button type="submit" style="width: 80px; height: 40px; border-radius: 20%;border: none;background-color: #17A2B8;">
														<input type="hidden" name="qtype" value=2><br/>
														<h4 style="margin-top:-10px;">
															<font color="white">填空题</font>
														</h4>
													</button>
												</form>
											</div>
											<div class="eachtype">
												<form action="/AddingExamquestion1" enctype='multipart/form-data' method='POST'>
													<button type="submit" style="width: 80px; height: 40px; border-radius: 20%;border: none;background-color: #17A2B8;">
														<input type="hidden" name="qtype" value=3><br/>
														<h4 style="margin-top:-10px;">
															<font color="white">简答题</font>
														</h4>
													</button>
												</form>
											</div>
											<div class="eachtype"></div>
											<div class="eachtype"></div>
											<div class="eachtype">
												<form action="/Finishaddexam" enctype='multipart/form-data' method='POST'>
													<button type="submit" style="width: 80px; height: 40px; border-radius: 20%;border: none;background-color: #aa0000;">
														<h4 style="margin-top:10px;">
															<font color="white">提交试卷</font>
														</h4>
													</button>  
												</form>	
											</div>
											<div class="eachtype"></div>
											<div class="eachtype"></div>
									</div>	
									<div class="forinput">
										<div class="subthing">题目id：</div>
										<div class="subthing">
											<p th:text="${newqinfo.id}" style="font-weight:700;"></p>
										</div>
										<div class="subthing">学科：</div>
										<div class="subthing">
											<p th:text="${newqinfo.subject}" style="font-weight:700;"></p>
											</div>
										<div class="subthing">
										</div>
										<div class="subthing">
										</div>	
									</div>
									<div class="forinput">
										<div class="subthing">分值：</div>
										<div class="subthing">
											<p th:text="${newqinfo.point}" style="font-weight:700;">23</p>
										</div>
										<div class="subthing">难度：</div>
										<div class="subthing">
											<div th:if ="${difficulty} eq '0.2'">
												<p style="font-weight:700;">简单</p>
											</div>
											<div th:if ="${difficulty} eq '0.5'">
												<p style="font-weight:700;">中等</p>
											</div>
											<div th:if ="${difficulty} eq '0.8'">
												<p style="font-weight:700;">困难</p>
											</div>
										</div>
										<div class="subthing"></div>
										<div class="subthing"></div>
									</div>
									<div class="forinput2">
										<div class="subthing">题干：</div>
										<div class="subthing">
											<p th:text="${newqinfo.content}" style="margin-left:20px;margin-top:5px;"></p>
										</div>
										<div class="subthing"></div>
										<div class="subthing"></div>
									</div>
									<div class="forinput3">
										<div class="subtext">题目照片：</div>
										<div class="subpic">
											<div th:if="${#strings.isEmpty(newqinfo.picture)}">
												<p>无辅助题目照片</p>
											</div>
											<div th:if="${not #strings.isEmpty(newqinfo.picture)}">
												<img th:src="@{${newqinfo.picture}}" width="100%">
											</div>
										</div>
									</div>
									<!-- 选择题要额外加选项 -->
									<div th:if ="${qtype} eq '0'">
										<div class="forinput2">
											<div class="subthing">
												<div th:if="${newqinfo.answer} eq 'A'">
													<input class="form-check-input" type="radio" checked>
												</div>
												<div th:if="${newqinfo.answer} ne 'A'">
													<input class="form-check-input" type="radio" >
												</div>
												<span class="form-check-label">A</span>
											</div>
											<div class="subthing">
												<p th:text="${newqinfo.optiona}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div class="subthing">
												<div th:if="${newqinfo.answer} eq 'B'">
													<input class="form-check-input" type="radio" checked>
												</div>
												<div th:if="${newqinfo.answer} ne 'B'">
													<input class="form-check-input" type="radio" >
												</div>
												<span class="form-check-label">B</span>
											</div>
											<div class="subthing">
												<p th:text="${newqinfo.optionb}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div class="subthing">
												<div th:if="${newqinfo.answer} eq 'C'">
													<input class="form-check-input" type="radio"  checked>
												</div>
												<div th:if="${newqinfo.answer} ne 'C'">
													<input class="form-check-input" type="radio">
												</div>
												<span class="form-check-label">C</span>
											</div>
											<div class="subthing">
												<p th:text="${newqinfo.optionc}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div class="subthing">
												<div th:if="${newqinfo.answer} eq 'D'">
													<input class="form-check-input" type="radio" checked>
												</div>
												<div th:if="${newqinfo.answer} ne 'D'">
													<input class="form-check-input" type="radio" >
												</div>
												<span class="form-check-label">D</span>
											</div>
											<div class="subthing">
												<p th:text="${newqinfo.optiond}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
									</div>
									<!-- 判断题的答案是T or F -->
									<div th:if ="${qtype} eq '1'">
										<div class="forinput5">
											<div class="subthing">题目答案：</div>
											<div class="subthing">
												<div class="subsub">
													<div th:if="${newqinfo.answer} eq 'T'">
														<input class="form-check-input" type="radio" name="type" value=1 checked="true">
													</div>
													<div th:if="${newqinfo.answer} ne 'T'">
														<input class="form-check-input" type="radio" name="type" value=1>
													</div>
													<span class="form-check-label">正确</span>
												</div>
												<div class="subsub">
													<div th:if="${newqinfo.answer} eq 'F'">
														<input class="form-check-input" type="radio" name="type" value=1 checked="true">
													</div>
													<div th:if="${newqinfo.answer} ne 'F'">
														<input class="form-check-input" type="radio" name="type" value=1>
													</div>
													<span class="form-check-label">错误</span>
												</div>
												<div class="subsub"></div>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
											<div class="subthing"></div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div> 
									</div>
									<div th:if ="${qtype} ge '2'">
										<div class="forinput2">
											<div class="subthing">答案：</div>
											<div class="subthing">
												<p th:text="${newqinfo.answer}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
									</div>
									<div th:if ="${qtype} eq '3'">
										<div class="forinput3">
											<div class="subtext">题目照片：</div>
											<div class="subpic">
												<div th:if="${#strings.isEmpty(newqinfo.answerpic)}">
													<p>无题目标准答案照片</p>
												</div>
												<div th:if="${not #strings.isEmpty(newqinfo.answerpic)}">
													<img th:src="@{${newqinfo.answerpic}}" width="100%">
												</div>
											</div>
										</div>
									</div>
				</div>
			</section>
				
				<footer class="footer">
					<div class="container-fluid">
						<div class="row text-muted">
							<div class="col-6 text-start">
								<p class="mb-0">
									<a class="text-muted" href="https://adminkit.io/" target="_blank"><strong>AdminKit</strong></a> &copy;
								</p>
							</div>
							<div class="col-6 text-end">
								<ul class="list-inline">
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Support</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Help Center</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Privacy</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Terms</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</footer>
			</div>
		</div>
		
		<script src="js/app.js"></script>
	</body>
</html>
